package com.learn.staticProxy;

//代理类
public class ClothFactoryProxy implements ClothFactory {
    private ClothFactory clothFactory;//拿被代理类对象初始化

    public ClothFactoryProxy(ClothFactory clothFactory) {
        this.clothFactory = clothFactory;
    }

    @Override
    public void produceCloth() {
        System.out.println("代理工程做一些准备工作");
        clothFactory.produceCloth();
        System.out.println("代理工程做收尾工作");
    }
}
